package com.hc.kotlin

fun main() {
    fun Int.isPrime():Boolean{
        (2 until this).map {
            if (this % it ==0){
                return false
            }
        }
        return true
    }

    val total = generateSequence(2) {
        it + 1
    }.filter {
        it.isPrime()
    }.take(50)
    println(total.toList())
}